const detail = {
  state: {
    details: {}
  },
  mutations: {
    SET_DETAILS: (state, detail) => {
      state.details = detail
    }
  },
  actions: {
    set_details({ commit }, data) {
      return new Promise(resolve => {
        commit('SET_DETAILS', data)
        resolve()
      })
    },
    remove_details({ commit }) {
      return new Promise(resolve => {
        commit('SET_DETAILS', '')
        resolve()
      })
    }
  }
}

export default detail
